package gt.actions;

import gt.domain.Qylx;
import gt.service.QylxService;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/alterQylx")
public class alterQylx extends HttpServlet {

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		    String qylx_id=req.getParameter("qylx_id");
		    System.out.println("oo"+qylx_id);
		    QylxService qylxService =new QylxService();
		    Qylx qylx=qylxService.getQylxById(qylx_id);
		    req.setAttribute("qylx", qylx);
		    req.getRequestDispatcher("baseInfo/alterQylx.jsp").forward(req, resp);
	}

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		this.doGet(req, resp);
	}
	
}
